from common.openai_ali import get_client

client = get_client()

def router(messages):
    if not any(
        isinstance(messages,dict) and messages.get('role') == 'system'
    ):
        system_prompt = {"role":"system","content":""}
        messages.append(system_prompt)

        response = client.chat.completions.create(
            model="qwen-plus",  # 指定模型
            messages=messages
        )